package pl.edu.pw.perg.compinfodb.ui;

import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JRootPane;

public class abc {

  public static void main(String[] args){
    JFrame frame = new JFrame("Iconifying and Maximizing a Frame");
//    frame.setUndecorated(false);
//    frame.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
    frame.pack();
    frame.setSize(new Dimension(200, 300));
    frame.setExtendedState(JFrame.MAXIMIZED_BOTH);  //Maximizing the frame

//    frame.setExtendedState(JFrame.ICONIFIED | frame.getExtendedState());
  //Minimizing or Iconifing the frame
//    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
}